libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [6/9] git commit: Avoid double split call.
Date Wed, 05 Feb 2014 19:45:02 GMT
Avoid double split call.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/8f2e5514
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/8f2e5514
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/8f2e5514

Branch: refs/heads/trunk
Commit: 8f2e551437cc2ab7e8a447fd159e03c1e56171e5
Parents: e010a34
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Wed Feb 5 14:38:12 2014 +0100
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Wed Feb 5 14:38:12 2014 +0100

----------------------------------------------------------------------
 libcloud/dns/drivers/route53.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/8f2e5514/libcloud/dns/drivers/route53.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/route53.py b/libcloud/dns/drivers/route53.py
index 1df6643..811b7a2 100644
--- a/libcloud/dns/drivers/route53.py
+++ b/libcloud/dns/drivers/route53.py
@@ -301,8 +301,8 @@ class Route53DNSDriver(DNSDriver):
         extra = {'ttl': ttl}
 
         if type == 'MX':
-            priority = int(data.split()[0])
-            data = data.split()[1]
+            split = data.split()
+            priority, data = int(split[0]), split[1]
             extra['priority'] = priority
 
         id = ':'.join((self.RECORD_TYPE_MAP[type], name))


Mime
View raw message