Skip to content

Commit

Permalink
bugfix: python: work on old files
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Aug 18, 2013
1 parent 7c891c3 commit 297c5ed
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions python/multicamselfcal/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,21 @@ def execute(self, blocking=True, cb=None, dest=None, silent=True, copy_files=Tru
for f in self.INPUT:
src = os.path.join(self.out_dirname,f)
if copy_files:
shutil.copy(src, dest)
if os.path.isfile(src):
shutil.copy(src, dest)
else:
LOG.warn("Could not find %s" % src)
else:
if not os.path.isfile(src):
LOG.warn("Could not find %s" % src)

if copy_files:
for k,v in self.get_camera_names_map().items():
src = os.path.join(self.out_dirname,v)
shutil.copy(src, dest)
if os.path.isfile(src):
shutil.copy(src, dest)
else:
LOG.warn("Could not find %s" % src)

cfg = os.path.abspath(os.path.join(dest, "multicamselfcal.cfg"))

Expand Down

0 comments on commit 297c5ed

Please sign in to comment.