Commits

Enis Afgan committed 6ead7bc

Get rid of the deprecated use of has_key method

Comments (0)

Files changed (2)

cm/controllers/root.py

 
     def get_CM_url(self, trans):
         changesets = self.app.manager.check_for_new_version_of_CM()
-        if changesets.has_key('default_CM_rev') and changesets.has_key('user_CM_rev'):
+        if 'default_CM_rev' in changesets and 'user_CM_rev' in changesets:
             try:
                 CM_url = trans.app.config.get("CM_url", "http://bitbucket.org/galaxy/cloudman/changesets/tip/")
                 # num_changes = int(changesets['default_CM_rev']) - int(changesets['user_CM_rev'])
                         tmp_ud = misc.load_yaml_file(tmp_pd)
                         # Currently, only a single volume snapshot can be associated
                         # a shared instance so pull it out of the list
-                        if tmp_ud.has_key('shared_data_snaps') and len(tmp_ud['shared_data_snaps']) == 1:
+                        if 'shared_data_snaps' in tmp_ud and len(tmp_ud['shared_data_snaps']) == 1:
                             snap_id = tmp_ud['shared_data_snaps'][0]
                         else:
                             snap_id = "Missing-ERROR"