Subversion Repositories SmartDukaan

Rev

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

Rev 19447 Rev 19448
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
        if not os.stat(infile).st_size==0:
17
        if os.stat(infile).st_size==0:
18
            print "file is of 0 size"
18
            print "file is of 0 size"
-
 
19
            continue
19
            shutil.copy2(default_image, infile)
20
            #shutil.copy2(default_image, infile)
20
        outfile = dir + "/" + sys.argv[2]
21
        outfile = dir + "/" + sys.argv[2]
21
        if not (os.path.isfile(outfile) and os.path.getmtime(outfile) > os.path.getmtime(infile)):
22
        if not (os.path.isfile(outfile) and os.path.getmtime(outfile) > os.path.getmtime(infile)):
22
            sys.stderr.write(infile)
23
            sys.stderr.write(infile)
23
            width = int(sys.argv[3])
24
            width = int(sys.argv[3])
24
            height = int(sys.argv[4])
25
            height = int(sys.argv[4])