diff options
Diffstat (limited to 'lorry')
-rwxr-xr-x | lorry | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -24,6 +24,7 @@ import string import sys from datetime import datetime import shutil +import traceback __version__ = '0.0' @@ -92,13 +93,14 @@ class Lorry(cliapp.Application): with open(arg) as f: specs = json.load(f) for name in sorted(specs.keys()): - try: - self.progress('Getting: %s' % name) + self.progress('Getting: %s' % name) + try: self.gitify(name, specs[name]) - except Exception,e: + except Exception,e: status += 1 - print 'Exception:',e - logging.debug('Mirroring Error: %s' %e) + sys.stderr.write( + 'Error mirroring:\n%s' % traceback.format_exc()) + logging.error(traceback.format_exc()) if status > 0 : logging.debug('Total Mirrors failed: %d' %status) status = 1 @@ -411,8 +413,9 @@ class Lorry(cliapp.Application): return ''.join(' %s\n' % line for line in string.splitlines()) def dirname(self, project_name): - assert '/' not in project_name assert '\0' not in project_name + # We escape slashes as underscores. + project_name = '_'.join(project_name.split('/')) return os.path.join(self.settings['working-area'], project_name) def progress(self, msg): |