Browse Source

Fix PEP8 tests for Python 3

* relace long with int
* replace execfile with exec

Change-Id: If98949fa5f49091fbf11c95a65302a4f844538c9
Story: 2003240
Task: 26827
Witold Bedyk 6 months ago
parent
commit
8257dd9f42

+ 1
- 1
devstack/files/monasca-transform/driver.py View File

@@ -13,7 +13,7 @@
13 13
 # under the License.
14 14
 
15 15
 activate_this_file = "/opt/monasca/transform/venv/bin/activate_this.py"
16
-execfile(activate_this_file, dict(__file__=activate_this_file))
16
+exec(open(activate_this_file).read(), dict(__file__=activate_this_file))
17 17
 
18 18
 from monasca_transform.driver.mon_metrics_kafka import invoke
19 19
 

+ 1
- 1
devstack/files/monasca-transform/service_runner.py View File

@@ -15,7 +15,7 @@
15 15
 import sys
16 16
 
17 17
 activate_this_file = "/opt/monasca/transform/venv/bin/activate_this.py"
18
-execfile(activate_this_file, dict(__file__=activate_this_file))
18
+exec(open(activate_this_file).read(), dict(__file__=activate_this_file))
19 19
 
20 20
 from monasca_transform.service.transform_service import main_service
21 21
 

+ 1
- 1
monasca_transform/driver/mon_metrics_kafka.py View File

@@ -118,7 +118,7 @@ class MonMetricsKafkaProcessor(object):
118 118
                     # partition = saved_offset_spec[composite_key]
119 119
                     from_offsets[
120 120
                         TopicAndPartition(spec_topic, spec_partition)
121
-                    ] = long(spec_until_offset)
121
+                    ] = int(spec_until_offset)
122 122
 
123 123
             MonMetricsKafkaProcessor.log_debug(
124 124
                 "get_kafka_stream: calling createDirectStream :"

Loading…
Cancel
Save