~ubuntu-core-dev/dput/debian

« back to all changes in this revision

Viewing changes to dcut

  • Committer: siretart at tauware
  • Date: 2006-06-15 14:24:47 UTC
  • Revision ID: siretart@tauware.de-20060615142447-945488ef00344069
import Version: 0.9.2.23

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import sys, getopt, os, tempfile, string, time
22
22
 
23
23
progname = "dcut"
24
 
version = "0.0.7"
 
24
version = "0.0.8"
25
25
 
26
26
USAGE = """Usage: %s [options] [host] command [, command]
27
27
 Supported options (see man page for long forms):
120
120
      sys.exit(1)
121
121
  
122
122
  if not options['host'] and arguments and arguments[0] not in validcommands:
123
 
    options['host'] = arguments[0]
124
 
    if options['debug']: print 'D: first argument "%s" treated as host'%(options['host'])
125
 
    del arguments[0]
 
123
      options['host'] = arguments[0]
 
124
      if options['debug']: print 'D: first argument "%s" treated as host'%(options['host'])
 
125
      del arguments[0]
 
126
 
126
127
    
127
128
  # we don't create command files without uploader
128
129
  if not options['uploader'] and not options['filetoupload']:
271
272
  if not options['host'] and config.has_option('DEFAULT', 'default_host_main'):
272
273
    options['host'] = config.get('DEFAULT', 'default_host_main')
273
274
    if options['debug']: print 'D: Using host "%s" (default_host_main)'%(options['host'])
 
275
    if not options['host']:
 
276
      options['host'] = 'ftp-master'
 
277
      if options['debug']: print 'D: Using host "%s" (hardcoded)'%(options['host'])
274
278
  tempdir = None
275
279
  if not (options['filetoupload'] or options['filetocreate']):
276
280
    tempdir = tempfile.mkdtemp(prefix=progname+'.')