def main():
    p = Webupdate()
    if len(obtain_file()) != 0:
        def go():
            for f in obtain_file():
                if isfile(f):
                    for h in web_host:
                        p.judge_file(h,f)
                elif isdir(f):
                    for h in web_host:
                        p.judge_dir(h,f)
            return 0
    else:
        print 'Not file update,Please /data/salt/python/upload!'
    
    if go() == 0:
        for h in web_host:
            p.dir_create(h)
        
        for f in obtain_file():
            if isfile(f):
                for h in web_host:
                    p.get_file(h,f)
            if isdir(f):
                for h in web_host:
                    p.get_dir(h,f)
Example #2
0
def main():
    p = Webupdate()
    if len(obtain_file()) != 0:

        def go():
            for f in obtain_file():
                if isfile(f):
                    for h in web_host:
                        p.judge_file(h, f)
                elif isdir(f):
                    for h in web_host:
                        p.judge_dir(h, f)
            return 0
    else:
        print 'Not file update,Please /data/salt/python/upload!'

    if go() == 0:
        for h in web_host:
            p.dir_create(h)

        for f in obtain_file():
            if isfile(f):
                for h in web_host:
                    p.get_file(h, f)
            if isdir(f):
                for h in web_host:
                    p.get_dir(h, f)
 def go():
     for f in obtain_file():
         if isfile(f):
             for h in web_host:
                 p.judge_file(h,f)
         elif isdir(f):
             for h in web_host:
                 p.judge_dir(h,f)
     return 0
Example #4
0
 def go():
     for f in obtain_file():
         if isfile(f):
             for h in web_host:
                 p.judge_file(h, f)
         elif isdir(f):
             for h in web_host:
                 p.judge_dir(h, f)
     return 0