Permalink
Browse files

Merge pull request #18 from fedora-infra/feature/handle_jar_war

Feature/handle jar war
  • Loading branch information...
2 parents b2dfb81 + 1951a33 commit 7a40e15e3971a7297c76edfc1ac88290aab2b0b9 @ralphbean ralphbean committed Feb 21, 2014
Showing with 7 additions and 0 deletions.
  1. +7 −0 summershum/utils.py
View
@@ -1,5 +1,6 @@
import hashlib
import os
+import zipfile
import requests
@@ -46,6 +47,12 @@ def calculate_sums(session, message, tmpdir):
if local_filename.endswith('.gem'):
return
+ if zipfile.is_zipfile(local_filename):
+ if local_filename.endswith('.jar') or local_filename.endswith('.war'):
+ log.debug('Invalid sources uploaded: %r - package: %r' % (
+ local_filename, message.get('name')))
+ return
+
cmd = ['rpmdev-extract', '-C', tmpdir, local_filename]
proc = Popen(cmd, stdout=PIPE, stderr=PIPE)
if proc.returncode:

0 comments on commit 7a40e15

Please sign in to comment.