~mterry/duplicity/testfixes

« back to all changes in this revision

Viewing changes to duplicity/commandline.py

  • Committer: Kenneth Loafman
  • Date: 2012-02-05 19:07:35 UTC
  • Revision ID: kenneth@loafman.com-20120205190735-2aiz9e849xjjx8tk
Applied patch by Alexander Zangerl from bug 909031, "SSH-Backend: Creating dirs separately causes a permissons-problems".

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
                          "and will be removed in a future release.\n"
69
69
                          "Use of default filenames is strongly suggested.") % opt
70
70
 
 
71
def scp_deprecation(o,s,v,p):
 
72
    print >>sys.stderr, "Warning: Option %s is deprecated and ignored. Use --ssh-options instead." % o
 
73
 
71
74
 
72
75
def expand_fn(filename):
73
76
    return os.path.expanduser(os.path.expandvars(filename))
472
475
 
473
476
    # scp command to use
474
477
    # TRANSL: noun
475
 
    parser.add_option("--scp-command", metavar=_("command"))
 
478
    parser.add_option("--scp-command", nargs=1, type="string",
 
479
                      action="callback", callback=scp_deprecation)
476
480
 
477
481
    # sftp command to use
478
482
    # TRANSL: noun
479
 
    parser.add_option("--sftp-command", metavar=_("command"))
 
483
    parser.add_option("--sftp-command", nargs=1, type="string",
 
484
                      action="callback", callback=scp_deprecation)
480
485
 
481
486
    # If set, use short (< 30 char) filenames for all the remote files.
482
487
    parser.add_option("--short-filenames", action="callback",