Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Only remove gem junk if it exists. #28

Merged
merged 1 commit into from

2 participants

@ralphbean
Owner

No description provided.

@pypingou
Owner

:+1:

@ralphbean ralphbean merged commit 47ac454 into from
@ralphbean ralphbean deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 27, 2014
  1. @ralphbean
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 2 deletions.
  1. +6 −2 summershum/utils.py
View
8 summershum/utils.py
@@ -49,9 +49,13 @@ def calculate_sums(session, message, tmpdir):
cmd = ['rpmdev-extract', '-C', tmpdir, local_filename]
proc = Popen(cmd, stdout=PIPE, stderr=PIPE)
proc.communicate()
+
# Remove not-used files
- os.unlink(os.path.join(tmpdir, 'metadata.gz'))
- os.unlink(os.path.join(tmpdir, 'checksums.yaml.gz'))
+ for gem_gz in ['metadata.gz', 'checksums.yaml.gz']:
+ gem_gz = os.path.join(tmpdir, gem_gz)
+ if os.path.exists(gem_gz):
+ os.unlink(gem_gz)
+
# Remove original sources - we only keep the data archive
os.unlink(local_filename)
local_filename = os.path.join(tmpdir, 'data.tar.gz')
Something went wrong with that request. Please try again.