Subversion Repositories SmartDukaan

Rev

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

Rev 18921 Rev 19445
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
            shutil.copy2(default_image, infile)
15
            shutil.copy2(default_image, infile)
16
        outfile = dir + "/" + sys.argv[2]
16
        outfile = dir + "/" + sys.argv[2]
17
        if not (os.path.isfile(outfile) and os.path.getmtime(outfile) > os.path.getmtime(infile)):
17
        if not (os.path.isfile(outfile) and os.stat(infile).st_size==0 and os.path.getmtime(outfile) > os.path.getmtime(infile)):
18
            sys.stderr.write(infile)
18
            sys.stderr.write(infile)
19
            width = int(sys.argv[3])
19
            width = int(sys.argv[3])
20
            height = int(sys.argv[4])
20
            height = int(sys.argv[4])
21
            size = width, height
21
            size = width, height
22
            im = Image.open(infile)
22
            im = Image.open(infile)