various fixes

This commit is contained in:
Mario Voigt 2021-07-11 00:13:45 +02:00
parent 26e06ecfe0
commit 14c2c66230
3 changed files with 6 additions and 11 deletions

View File

@ -36,13 +36,6 @@ class AboutUpgradeMightyScape(inkex.EffectExtension):
remoteCommit = remote_repo.fetch()[0].commit remoteCommit = remote_repo.fetch()[0].commit
self.msg("Latest remote commit is: " + str(remoteCommit)[:7]) self.msg("Latest remote commit is: " + str(remoteCommit)[:7])
# for every remote commit
while remoteCommit.hexsha != localCommit.hexsha:
try:
remoteCommit = remoteCommit.parents[0]
except:
pass
if localCommit.hexsha != remoteCommit.hexsha: if localCommit.hexsha != remoteCommit.hexsha:
ssh_executable = 'git' ssh_executable = 'git'
with local_repo.git.custom_environment(GIT_SSH=ssh_executable): with local_repo.git.custom_environment(GIT_SSH=ssh_executable):
@ -58,7 +51,9 @@ class AboutUpgradeMightyScape(inkex.EffectExtension):
else: else:
inkex.utils.debug("Nothing to do! MightyScape is already up to date!") inkex.utils.debug("Nothing to do! MightyScape is already up to date!")
except git.exc.GitCommandError: except git.exc.GitCommandError as e:
self.msg("Error: ")
self.msg(e)
return False return False
return True return True

View File

@ -426,7 +426,7 @@ else:
# normally # normally
destination = filename + ".cutstudio.eps" destination = filename + ".cutstudio.eps"
EPS2CutstudioEPS(inkscape_eps_file, destination, mirror=("--mirror=true" in sys.argv)) OpenInRolandCutStudio(inkscape_eps_file, destination, mirror=("--mirror=true" in sys.argv))
if "--selftest" in sys.argv: if "--selftest" in sys.argv:
# unittest: compare with known reference output # unittest: compare with known reference output

View File

@ -69,7 +69,7 @@ class pnPoint(object):
j=i j=i
return inside return inside
class Tabgen(inkex.EffectExtension): class TabGenerator(inkex.EffectExtension):
def add_arguments(self, pars): def add_arguments(self, pars):
pars.add_argument("--usermenu") pars.add_argument("--usermenu")
@ -665,4 +665,4 @@ class Tabgen(inkex.EffectExtension):
elem.delete() elem.delete()
if __name__ == '__main__': if __name__ == '__main__':
Tabgen().run() TabGenerator().run()