diff options
| -rw-r--r-- | project.py | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -34,6 +34,10 @@ R_TAGS = 'refs/tags/' | |||
| 34 | R_PUB = 'refs/published/' | 34 | R_PUB = 'refs/published/' |
| 35 | R_M = 'refs/remotes/m/' | 35 | R_M = 'refs/remotes/m/' |
| 36 | 36 | ||
| 37 | def _error(fmt, *args): | ||
| 38 | msg = fmt % args | ||
| 39 | print >>sys.stderr, 'error: %s' % msg | ||
| 40 | |||
| 37 | def _warn(fmt, *args): | 41 | def _warn(fmt, *args): |
| 38 | msg = fmt % args | 42 | msg = fmt % args |
| 39 | print >>sys.stderr, 'warn: %s' % msg | 43 | print >>sys.stderr, 'warn: %s' % msg |
| @@ -199,9 +203,7 @@ class _CopyFile: | |||
| 199 | mode = mode & ~(stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH) | 203 | mode = mode & ~(stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH) |
| 200 | os.chmod(dest, mode) | 204 | os.chmod(dest, mode) |
| 201 | except IOError: | 205 | except IOError: |
| 202 | print >>sys.stderr, \ | 206 | _error('Cannot copy file %s to %s', src, dest) |
| 203 | 'error: Cannot copy file %s to %s' \ | ||
| 204 | % (src, dest) | ||
| 205 | 207 | ||
| 206 | 208 | ||
| 207 | class Project(object): | 209 | class Project(object): |
