Skip to content

Commit

Permalink
python3 compat, sanitize
Browse files Browse the repository at this point in the history
  • Loading branch information
enriclluelles committed Nov 10, 2016
1 parent cf24ce5 commit 6b33360
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
6 changes: 3 additions & 3 deletions troposphere_sugar/__init__.py
@@ -1,3 +1,3 @@
from .skel import Skel
from .command import Command
from decorators import *
from troposphere_sugar.skel import Skel
from troposphere_sugar.command import Command
from troposphere_sugar.decorators import *
5 changes: 2 additions & 3 deletions troposphere_sugar/command.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from skel import Skel
from runner import Runner
from troposphere_sugar.skel import Skel
from troposphere_sugar.runner import Runner
import argparse
import re

Expand Down
1 change: 0 additions & 1 deletion troposphere_sugar/decorators/__init__.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
class cache(object):
def __init__(self, func):
Expand Down
2 changes: 1 addition & 1 deletion troposphere_sugar/runner.py
Expand Up @@ -63,7 +63,7 @@ def create(self):
def update(self):
try:
self.client.update_stack(**self.stack_operation_args())
except botocore.exceptions.ClientError, e:
except botocore.exceptions.ClientError as e:
if "No updates are to be performed" not in str(e):
raise

Expand Down
5 changes: 2 additions & 3 deletions troposphere_sugar/skel.py
@@ -1,6 +1,5 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from decorators import *
from troposphere_sugar.decorators import *
from troposphere import Template
from random import randint

Expand All @@ -16,7 +15,7 @@ def _defaults(self):
}

def _get_all_decorated_for_class(self, clazz, ttype):
all = clazz.__dict__.values()
all = list(clazz.__dict__.values())
for base_clazz in clazz.__bases__:
all += self._get_all_decorated_for_class(base_clazz, ttype)
return [prop for prop in all if isinstance(prop, ttype)]
Expand Down

0 comments on commit 6b33360

Please sign in to comment.