@@ -1258,8 +1258,7 @@ def list_last_loglines(self, lines=100):
12581258 def list_servers_to_act (cls , action , base_directory ):
12591259 """Generator listing all servers doing action at this minute in time"""
12601260 from procfs_reader import path_owner
1261- from ConfigParser import NoOptionError , NoSectionError
1262-
1261+
12631262 hits = []
12641263 msm = cls .minutes_since_midnight ()
12651264
@@ -1271,11 +1270,11 @@ def list_servers_to_act(cls, action, base_directory):
12711270 raise NotImplementedError ("Requested action is not yet implemented." )
12721271
12731272 for i in cls .list_servers (base_directory ):
1274- path_ = os .path .join (base_directory , cls .DEFAULT_PATHS ['servers' ], i )
1275- owner_ = path_owner (path_ )
1276- instance = cls (i , owner_ , base_directory )
1277-
12781273 try :
1274+ path_ = os .path .join (base_directory , cls .DEFAULT_PATHS ['servers' ], i )
1275+ owner_ = path_owner (path_ )
1276+ instance = cls (i , owner_ , base_directory )
1277+
12791278 interval = instance .server_config .getint (section_option [0 ],section_option [1 ])
12801279 '''at midnight, always archive. this works because
12811280 if archive_interval is not type(int), e.g., 'skip' or '',
@@ -1284,16 +1283,16 @@ def list_servers_to_act(cls, action, base_directory):
12841283 hits .append (i )
12851284 elif msm % interval == 0 :
12861285 hits .append (i )
1287- except (ZeroDivisionError , KeyError , ValueError , NoOptionError , NoSectionError ):
1288- pass
1286+ except Exception :
1287+ '''(ZeroDivisionError, KeyError, ValueError, NoOptionError, NoSectionError, OSError)'''
1288+ continue
12891289
12901290 return hits
12911291
12921292 @classmethod
12931293 def list_servers_start_at_boot (cls , base_directory ):
12941294 from procfs_reader import path_owner
1295- from ConfigParser import NoOptionError , NoSectionError
1296-
1295+
12971296 hits = []
12981297 msm = cls .minutes_since_midnight ()
12991298
@@ -1305,7 +1304,8 @@ def list_servers_start_at_boot(cls, base_directory):
13051304 try :
13061305 if instance .server_config .getboolean ('onreboot' , 'start' ):
13071306 hits .append (i )
1308- except (ValueError , KeyError , NoSectionError , NoOptionError ):
1307+ except Exception :
1308+ '''(ValueError, KeyError, NoSectionError, NoOptionError)'''
13091309 pass
13101310
13111311 return hits
0 commit comments