diff options
author | Guido Guenther <agx@sigxcpu.org> | 2007-12-28 23:01:10 +0100 |
---|---|---|
committer | Guido Guenther <agx@sigxcpu.org> | 2007-12-28 23:01:10 +0100 |
commit | 1ac78c6b7d23a5d025742c2b7a5ddc4c2cdaedcb (patch) | |
tree | a3051f9045b075754920e72969a796a44b361070 /gbp | |
parent | ac5bd6fca436a4e1f078c4bc32e838f07a650920 (diff) |
don't fail when importing into empty git archives
Diffstat (limited to 'gbp')
-rw-r--r-- | gbp/git_utils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gbp/git_utils.py b/gbp/git_utils.py index 39ff89af..fffa3f64 100644 --- a/gbp/git_utils.py +++ b/gbp/git_utils.py @@ -81,8 +81,10 @@ class GitRepository(object): out, ret = self.__git_getoutput('ls-files', ['-z']) if ret: raise GitRepositoryError, "Error listing files %d" % ret - files = [ file for file in out[0].split('\0') if file ] - return files + if out: + return [ file for file in out[0].split('\0') if file ] + else: + return [] def build_tag(format, version): |