Skip to content

Commit

Permalink
Removed unnecessary use of os.path.basename in get_version_from_file
Browse files Browse the repository at this point in the history
which caused problems on windows. Thanks to Petr Marhoun
<petr.marhoun@gmail.com> for bug report and patch.

git-svn-id: https://django-compress.googlecode.com/svn/trunk@94 98d35234-f74b-0410-9e22-51d878bdf110
  • Loading branch information
andreas.pelme committed Dec 5, 2008
1 parent 1617361 commit 6df3ec5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compress/utils.py
Expand Up @@ -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():
Expand Down

0 comments on commit 6df3ec5

Please sign in to comment.