Skip to content

Commit 11b44d7

Browse files
committed
add Python 3 compatibility #12
1 parent 31d2c65 commit 11b44d7

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

cloudwatchmon/cli/get_instance_stats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def print_metric_stats(region, instance_id, namespace, metric, title,
7171
start_time = end_time - datetime.timedelta(hours=recent_hours)
7272
dims = {'InstanceId': instance_id}
7373
if xdims:
74-
dims = dict(dims.items() + xdims.items())
74+
dims.update(xdims)
7575
metrics = conn.get_metric_statistics(300, start_time, end_time,
7676
metric, namespace,
7777
['Average', 'Maximum', 'Minimum'],

cloudwatchmon/cli/put_instance_stats.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ def __add_metric_dimensions(self, name, unit, value, common_dims, dims):
170170
self.names.append(name)
171171
self.units.append(unit)
172172
self.values.append(value)
173-
self.dimensions.append(dict(common_dims.items() + dim.items()))
173+
metric_dims = common_dims.copy()
174+
metric_dims.update(dim)
175+
self.dimensions.append(metric_dims)
174176

175177
def send(self, verbose):
176178
boto_debug = 2 if verbose else 0

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ def readme():
3030
]
3131
},
3232
classifiers=[
33-
'Programming Language :: Python :: 2 :: Only',
33+
'Programming Language :: Python :: 2',
34+
'Programming Language :: Python :: 2.6',
35+
'Programming Language :: Python :: 2.7',
36+
'Programming Language :: Python :: 3',
37+
'Programming Language :: Python :: 3.3',
38+
'Programming Language :: Python :: 3.4',
39+
'Programming Language :: Python :: 3.5',
3440
'License :: OSI Approved :: Apache Software License',
3541
'Topic :: System :: Monitoring'
3642
]

0 commit comments

Comments
 (0)