+ if args.force and not os.path.exists(name):
+ continue
+ is_dir = os.path.isdir(name)
+ if not args.force and not os.access(name, os.W_OK):
+ if is_dir:
+ ftype = 'directory'
+ else:
+ ftype = 'file'
+ try:
+ while True:
+ rmw = raw_input(
+ "rm.py: remove write-protected %s '%s'? [y/n] "
+ % (ftype, name))
+ answer = rmw[:1].lower()
+ if answer == 'y':
+ break
+ elif answer == 'n':
+ raise StopIteration
+ else:
+ continue
+ except StopIteration:
+ continue
+ if is_dir: