Browse Source

Makes queue import cross py2/py3 compatible

See http://logs.openstack.org/26/613726/2/check/tox-py27/c389283/job-output.txt.gz

Change-Id: I1f1fc7b9393cfa44cfb3ba06ee06185fc7569d3a
changes/28/613728/1
Sorin Sbarnea 6 months ago
parent
commit
b7f4d86bb9
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      roles/upload-logs-swift/library/zuul_swift_upload.py

+ 4
- 1
roles/upload-logs-swift/library/zuul_swift_upload.py View File

@@ -28,7 +28,10 @@ import argparse
28 28
 import logging
29 29
 import mimetypes
30 30
 import os
31
-import queue as queuelib
31
+try:
32
+    import queue as queuelib
33
+except ImportError:
34
+    import Queue as queuelib
32 35
 import stat
33 36
 import sys
34 37
 import tempfile

Loading…
Cancel
Save