I think you'd better not use shell commnad. File object has truncate() function to get a desired size file.
ref_size = os.path.getsize(ref_file)
if resize:
    ref_size = resize
file_new = open(new_file, 'w')
file_new.truncate(ref_size)

About judgment of exception you can add it yourself  :)