salt/prepend-current-directory-when-path-is-just-filename.patch
Bo Maryniuk c0d7cc4bb8 Accepting request 636187 from home:mdinca:branches:systemsmanagement:saltstack
- Prepend current directory when path is just filename (bsc#1095942)
- Integration of MSI authentication for azurearm
- Adds fix for SUSE Expanded Support os grain detection
- Fixes 509x remote signing
- Fix for StringIO import in Python2
- Use Adler32 algorithm to compute string checksums (bsc#1102819)
- Only do reverse DNS lookup on IPs for salt-ssh (bsc#1104154)
- Add support for Python 3.7
- Fix license macro to build on SLE12SP2
- Decode file contents for python2 (bsc#1102013)
- Fix for sorting of multi-version packages (bsc#1097174 and bsc#1097413)
- Fix mine.get not returning data - workaround for #48020 (bsc#1100142)
- Added:
  * change-stringio-import-in-python2-to-import-the-clas.patch
  * integration-of-msi-authentication-with-azurearm-clou.patch
  * x509-fixes-for-remote-signing-106.patch
  * fix-for-suse-expanded-support-detection.patch
  * only-do-reverse-dns-lookup-on-ips-for-salt-ssh.patch
  * prepend-current-directory-when-path-is-just-filename.patch
  * add-support-for-python-3.7.patch
  * decode-file-contents-for-python2-bsc-1102013.patch
  * fix-mine.get-not-returning-data-workaround-for-48020.patch
  * x509-fixes-111.patch
  * use-adler32-algorithm-to-compute-string-checksums.patch
- Modified:
  * fix-for-sorting-of-multi-version-packages-bsc-109717.patch

OBS-URL: https://build.opensuse.org/request/show/636187
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=129
2018-09-17 14:18:45 +00:00

39 lines
1.3 KiB
Diff

From 341ee0c44cabf2f34bdd2f4b54e4b83053a3133e Mon Sep 17 00:00:00 2001
From: Mihai Dinca <mdinca@suse.de>
Date: Thu, 23 Aug 2018 16:14:36 +0200
Subject: [PATCH] Prepend current directory when path is just filename
(bsc#1095942)
---
salt/utils/parsers.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/salt/utils/parsers.py b/salt/utils/parsers.py
index 5a415ab576..9a7f27ac11 100644
--- a/salt/utils/parsers.py
+++ b/salt/utils/parsers.py
@@ -591,10 +591,19 @@ class LogLevelMixIn(six.with_metaclass(MixInMeta, object)):
)
)
+ def _logfile_callback(option, opt, value, parser, *args, **kwargs):
+ if not os.path.dirname(value):
+ # if the path is only a file name (no parent directory), assume current directory
+ value = os.path.join(os.path.curdir, value)
+ setattr(parser.values, self._logfile_config_setting_name_, value)
+
group.add_option(
'--log-file',
dest=self._logfile_config_setting_name_,
default=None,
+ action='callback',
+ type='string',
+ callback=_logfile_callback,
help='Log file path. Default: \'{0}\'.'.format(
self._default_logging_logfile_
)
--
2.19.0