Subversion Repositories SmartDukaan

Rev

Rev 19446 | Rev 19448 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19446 Rev 19447
Line 12... Line 12...
12
    if os.path.isdir(os.path.join("./", dir)):
12
    if os.path.isdir(os.path.join("./", dir)):
13
        infile = dir + "/" + sys.argv[1]
13
        infile = dir + "/" + sys.argv[1]
14
        if not os.path.isfile(infile):
14
        if not os.path.isfile(infile):
15
            print "file is missing"
15
            print "file is missing"
16
            shutil.copy2(default_image, infile)
16
            shutil.copy2(default_image, infile)
17
        elif not os.stat(infile).st_size==0:
17
        if not os.stat(infile).st_size==0:
18
            print "file is of 0 size"
18
            print "file is of 0 size"
19
            shutil.copy2(default_image, infile)
19
            shutil.copy2(default_image, infile)
20
        outfile = dir + "/" + sys.argv[2]
20
        outfile = dir + "/" + sys.argv[2]
21
        if not (os.path.isfile(outfile) and os.path.getmtime(outfile) > os.path.getmtime(infile)):
21
        if not (os.path.isfile(outfile) and os.path.getmtime(outfile) > os.path.getmtime(infile)):
22
            sys.stderr.write(infile)
22
            sys.stderr.write(infile)