Explorar o código

* cmdline/apt-mark:
- don't crash if no arguments are given (Closes: #570962)

David Kalnischkies %!s(int64=16) %!d(string=hai) anos
pai
achega
a94263ba75
Modificáronse 2 ficheiros con 6 adicións e 0 borrados
  1. 4 0
      cmdline/apt-mark
  2. 2 0
      debian/changelog

+ 4 - 0
cmdline/apt-mark

@@ -76,6 +76,10 @@ if __name__ == "__main__":
                       help="print verbose status messages to stdout")
                       help="print verbose status messages to stdout")
     (options, args) = parser.parse_args()
     (options, args) = parser.parse_args()
 
 
+    if not args:
+        parser.print_help()
+        sys.exit(1)
+
     # get the state-file
     # get the state-file
     if not options.filename:
     if not options.filename:
         STATE_FILE = apt_pkg.Config.FindDir("Dir::State") + "extended_states"
         STATE_FILE = apt_pkg.Config.FindDir("Dir::State") + "extended_states"

+ 2 - 0
debian/changelog

@@ -1,6 +1,8 @@
 apt (0.7.26) UNRELEASED; urgency=low
 apt (0.7.26) UNRELEASED; urgency=low
 
 
   * Switch to dpkg-source 3.0 (native) format
   * Switch to dpkg-source 3.0 (native) format
+  * cmdline/apt-mark:
+    - don't crash if no arguments are given (Closes: #570962)
 
 
  -- David Kalnischkies <kalnischkies@gmail.com>  Fri, 19 Feb 2010 21:21:43 +0100
  -- David Kalnischkies <kalnischkies@gmail.com>  Fri, 19 Feb 2010 21:21:43 +0100