summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2016-12-11 11:08:25 +0200
committerFathi Boudra <fathi.boudra@linaro.org>2016-12-11 11:08:25 +0200
commitd67eea34a5b82dc0fb26f39575c97c2a3c081fff (patch)
tree28089f5294a7d0e3c0af8c6d9f6b4757fd6ca01d
parent6ba065ab03883d5c989c57a05e37efd75387301e (diff)
downloadpublishing-api-d67eea34a5b82dc0fb26f39575c97c2a3c081fff.tar.gz
Optimize imports and reformat code
Change-Id: Ibd6f4140d18bd41ecafe1580197f1f71c781b960 Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
-rwxr-xr-xlinaro-cp.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/linaro-cp.py b/linaro-cp.py
index 54af9c1..e4dbf2c 100755
--- a/linaro-cp.py
+++ b/linaro-cp.py
@@ -2,18 +2,16 @@
import argparse
import atexit
-import os
import mimetypes
+import os
+import pprint
+import re
+import requests
import sys
import tempfile
import time
-import re
-import pprint
from multiprocessing.pool import ThreadPool
-import requests
-
-
# Public artifacts BUILD-INFO.txt
build_info = 'Format-Version: 0.5\n\nFiles-Pattern: *\nLicense-Type: open\n'
@@ -49,7 +47,8 @@ class API_v1(object):
p = ThreadPool(10)
transfer_failures = []
- results = [p.apply_async(self.upload_file, (transfer_item, transfer_queue[transfer_item])) for transfer_item in transfer_queue]
+ results = [p.apply_async(self.upload_file, (transfer_item, transfer_queue[transfer_item])) for transfer_item in
+ transfer_queue]
for res in results:
try: