Skip to content
Snippets Groups Projects
Commit 75b0f9c0 authored by Piotr Ożarowski's avatar Piotr Ożarowski
Browse files

dh_python2: ignore empty files while trying to normalize shebangs

parent 044869f9
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ python-defaults (2.7.3-2) UNRELEASED; urgency=low
* dist_fallback: add python-imaging (which wasn't recognized before due to
.pth file)
* dh_python2: ignore empty files while trying to normalize shebangs
-- Piotr Ożarowski <piotr@debian.org> Fri, 06 Jul 2012 23:03:32 +0200
......
......@@ -100,6 +100,9 @@ def fix_shebang(fpath, replacement=None):
try:
with open(fpath) as fp:
fcontent = fp.readlines()
if not fcontent:
log.debug('fix_shebang: ignoring empty file: %s', fpath)
return None
except IOError:
log.error('cannot open %s', fpath)
return False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment