Ignore:
Timestamp:
Sep 21, 2016, 3:39:57 PM (4 years ago)
Author:
kbut
Message:

fix bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lliurex-mirror/trunk/fuentes/lliurex-mirror-gui/lliurex_mirror_connect.py

    r2482 r2489  
    2424
    2525        def local_connect(self):
    26                 self.client = xmlrpclib.ServerProxy('https://localhost:9779')
     26                self.client = xmlrpclib.ServerProxy('https://localhost:9779',allow_none=True)
    2727                try:
    2828                        self.client.get_methods()
     
    4242
    4343        def mirror_list(self):
    44                 if self.client == None:
     44                if type(self.client) == None:
    4545                        return {}
    4646                result = self.client.get_all_configs(self.credentials,'MirrorManager')
     
    7171        #def create_conf
    7272
    73         def update(self,mirror,mode,data=None)
    74         '''
     73        def update(self,mirror,mode,data=None):
     74                '''
    7575                mode is option to update mirror. (Internet, local network, folder)
    7676                data is extra info to update (local network ip, )
    77         '''
     77                '''
    7878                self.mode = None
    7979                if mode == '2':
     
    129129                return result['status']
    130130        #def stop_update
     131
     132
     133if __name__ == '__main__':
     134        c = LliurexMirrorN4d('localhost',['kbut','lliurex'])
     135        print c.mirror_list()
Note: See TracChangeset for help on using the changeset viewer.