pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/pkgtools/url2pkg/files



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sun Feb  6 18:04:50 UTC 2022

Modified Files:
        pkgsrc/pkgtools/url2pkg/files: url2pkg.py

Log Message:
url2pkg: only accept a single URL as command line argument


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 pkgsrc/pkgtools/url2pkg/files/url2pkg.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/url2pkg/files/url2pkg.py
diff -u pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.37 pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.38
--- pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.37       Sun Feb  6 18:00:08 2022
+++ pkgsrc/pkgtools/url2pkg/files/url2pkg.py    Sun Feb  6 18:04:50 2022
@@ -1,5 +1,5 @@
 #! @PYTHONBIN@
-# $NetBSD: url2pkg.py,v 1.37 2022/02/06 18:00:08 rillig Exp $
+# $NetBSD: url2pkg.py,v 1.38 2022/02/06 18:04:50 rillig Exp $
 
 # Copyright (c) 2019 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1226,7 +1226,7 @@ def main(argv: List[str], g: Globals):
     except getopt.GetoptError:
         usage()
 
-    url = args[0] if args else usage()
+    url = args[0] if len(args) == 1 else usage()
     if not re.fullmatch(r'\w+://[!-~]+?/[!-~]+', url):
         sys.exit(f'url2pkg: invalid URL: {url}')
 



Home | Main Index | Thread Index | Old Index