[game-data-packager] 01/01: fix: "running from a deleted directory gives a cryptic error message"
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Sun Mar 6 19:58:15 UTC 2016
This is an automated email from the git hooks/post-receive script.
detiste-guest pushed a commit to branch master
in repository game-data-packager.
commit 5623d2cfd25cd567476faeff609294308f88fc52
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Sun Mar 6 20:57:59 2016 +0100
fix: "running from a deleted directory gives a cryptic error message"
---
debian/changelog | 2 ++
game_data_packager/command_line.py | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 00388c7..e41efd1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ game-data-packager (45) UNRELEASED; urgency=medium
- The Unreal patches provide lin_convenience_libs [skitt]
- Do not crash if there's no internet access and game
is possibly owned by user's Steam account [adetiste]
+ - Abort early when running from a deleted directory and --destination
+ hasn't been specified [adetiste] (Closes: #783319)
* Internal changes:
- Refactor dependency relationships and other distro- and
format-dependent values. They now take a map or list of
diff --git a/game_data_packager/command_line.py b/game_data_packager/command_line.py
index 88ecf67..e1afa65 100644
--- a/game_data_packager/command_line.py
+++ b/game_data_packager/command_line.py
@@ -263,6 +263,12 @@ def run_command_line():
elif not os.access(path, os.W_OK | os.X_OK):
logger.error('argument "%s" to %s is not writable', path, arg)
sys.exit(2)
+ elif path == '.':
+ try:
+ os.getcwd()
+ except FileNotFoundError:
+ logger.error('argument "%s" to %s has been delete', path, arg)
+ sys.exit(2)
if parsed.shortname == 'steam':
run_steam_meta_mode(parsed, games)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list