summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcanyonknight <canyonknight@gmail.com>2012-05-23 19:19:50 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2012-07-06 11:25:38 +0200
commite1a802d900eb1a5d2777818e2d26e7a5323d6af9 (patch)
treef25d793c0fe17335d2e4485b88bee947628603eb
parentb5244fe66e0ca2f3077798b5534fac580e69d2c9 (diff)
downloadaur-e1a802d900eb1a5d2777818e2d26e7a5323d6af9.tar.gz
aur-e1a802d900eb1a5d2777818e2d26e7a5323d6af9.tar.xz
gendummydata.py: Add check for command generating dummy comments
* Exit with an error if fortune command isn't found * No reason to enforce the "-l" option from the fortune command Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rwxr-xr-xsupport/schema/gendummydata.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/support/schema/gendummydata.py b/support/schema/gendummydata.py
index d0b8b718..957a4851 100755
--- a/support/schema/gendummydata.py
+++ b/support/schema/gendummydata.py
@@ -44,7 +44,7 @@ RANDOM_PATHS = ( # random path locations for package files
RANDOM_TLDS = ("edu", "com", "org", "net", "tw", "ru", "pl", "de", "es")
RANDOM_URL = ("http://www.", "ftp://ftp.", "http://", "ftp://")
RANDOM_LOCS = ("pub", "release", "files", "downloads", "src")
-FORTUNE_CMD = "/usr/bin/fortune -l"
+FORTUNE_CMD = "/usr/bin/fortune"
# setup logging
logformat = "%(levelname)s: %(message)s"
@@ -61,6 +61,12 @@ if not os.path.exists(SEED_FILE):
log.error("Please install the 'words' Arch package")
raise SystemExit
+# make sure comments can be created
+#
+if not os.path.exists(FORTUNE_CMD):
+ log.error("Please install the 'fortune-mod' Arch package")
+ raise SystemExit
+
# track what users/package names have been used
#
seen_users = {}