Commit f2f31ad5 by Andreas Pelme

Removed unnecessary use of os.path.basename in get_version_from_file

which caused problems on windows. Thanks to Petr Marhoun
<petr.marhoun@gmail.com> for bug report and patch.
parent 16173617
......@@ -94,7 +94,7 @@ def get_version(source_files, verbosity=0):
return version
def get_version_from_file(path, filename):
regex = re.compile(r'^%s$' % (os.path.basename(get_output_filename(settings.COMPRESS_VERSION_PLACEHOLDER.join([re.escape(part) for part in filename.split(settings.COMPRESS_VERSION_PLACEHOLDER)]), r'([A-Za-z0-9]+)'))))
regex = re.compile(r'^%s$' % (get_output_filename(settings.COMPRESS_VERSION_PLACEHOLDER.join([re.escape(part) for part in filename.split(settings.COMPRESS_VERSION_PLACEHOLDER)]), r'([A-Za-z0-9]+)')))
for f in os.listdir(path):
result = regex.match(f)
if result and result.groups():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment