~ubuntu-branches/ubuntu/trusty/dput-ng/trusty-proposed

« back to all changes in this revision

Viewing changes to dput/uploader.py

  • Committer: Package Import Robot
  • Author(s): Paul Tagliamonte, Paul Tagliamonte, Arno Töll
  • Date: 2012-12-26 09:30:06 UTC
  • Revision ID: package-import@ubuntu.com-20121226093006-8oebt2qovy5stc8a
Tags: 1.3
* The "we're so proud of our work, we need to let everyone know" release

[ Paul Tagliamonte ]
* Avoid failing on upload if a pre/post upload hook is missing from the
  Filesystem. Thanks to Moritz Mühlenhoff for the report. (Closes: #696659)
* Adjust Homepage: to point to our spiffy debian.net alias, rather then
  my people.debian.
* Add in experiemental clojure support via clojurepy hackery. It's
  amazingly cool, really. Thanks to Paul Tagliamonte for the extremely
  nice patch. Well done.

[ Arno Töll ]
* Fix "dcut raises FtpUploadException" by correctly initializing the uploader
  classes from dcut (Closes: #696467)

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
 
69
69
    def _run_hook(self, hook):
70
70
        if hook in self._config and self._config[hook] != "":
71
 
            (output, stderr, ret) = run_command(self._config[hook])
 
71
            cmd = self._config[hook]
 
72
            (output, stderr, ret) = run_command(cmd)
 
73
            if ret == -1:
 
74
                if not os.path.exists(cmd):
 
75
                    logger.warning(
 
76
                        "Error: You've set a hook (%s) to run (`%s`), "
 
77
                         "but it can't be found (and doesn't appear to exist). "
 
78
                         "Please verify the path and correct it." % (
 
79
                             hook,
 
80
                             self._config[hook]
 
81
                         )
 
82
                    )
 
83
                    return
 
84
 
72
85
            sys.stdout.write(output)  # XXX: Fixme
73
86
            if ret != 0:
74
87
                raise DputError(