forked from pool/python-cmd2
Accepting request 184332 from home:dheidler:branches:devel:languages:python
- Backport editor stderr fix OBS-URL: https://build.opensuse.org/request/show/184332 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cmd2?expand=0&rev=9
This commit is contained in:
parent
ed34845c21
commit
5be6e31bf2
23
fix_editor_stderr.patch
Normal file
23
fix_editor_stderr.patch
Normal file
@ -0,0 +1,23 @@
|
||||
# HG changeset patch
|
||||
# User desaintmartin <cedric@desaintmartin.fr>
|
||||
# Date 1369996392 0
|
||||
# Branch desaintmartin/fixed-which-calls-being-verbose-to-stder-1369996337663
|
||||
# Node ID 6743615a4a69908de97714e6673f14bfb96d3e6c
|
||||
# Parent a1818298610cb601c6ed5691531cd224ed59e6b5
|
||||
Fixed "which" calls being verbose to stderr.
|
||||
Add "vi" to the list of possible editors.
|
||||
|
||||
diff --git a/cmd2.py b/cmd2.py
|
||||
--- a/cmd2.py
|
||||
+++ b/cmd2.py
|
||||
@@ -420,8 +420,8 @@
|
||||
if sys.platform[:3] == 'win':
|
||||
editor = 'notepad'
|
||||
else:
|
||||
- for editor in ['gedit', 'kate', 'vim', 'emacs', 'nano', 'pico']:
|
||||
- if subprocess.Popen(['which', editor], stdout=subprocess.PIPE).communicate()[0]:
|
||||
+ for editor in ['gedit', 'kate', 'vim', 'vi', 'emacs', 'nano', 'pico']:
|
||||
+ if subprocess.Popen(['which', editor], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0]:
|
||||
break
|
||||
|
||||
colorcodes = {'bold':{True:'\x1b[1m',False:'\x1b[22m'},
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 25 15:35:32 UTC 2013 - dheidler@suse.de
|
||||
|
||||
- Backport editor stderr fix
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 29 11:18:38 UTC 2013 - dmueller@suse.com
|
||||
|
||||
|
@ -24,6 +24,7 @@ License: MIT
|
||||
Group: Development/Languages/Python
|
||||
Url: http://packages.python.org/cmd2/
|
||||
Source: http://pypi.python.org/packages/source/c/cmd2/cmd2-%{version}.tar.gz
|
||||
Patch0: fix_editor_stderr.patch
|
||||
BuildRequires: python-devel
|
||||
Requires: python-pyparsing
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -56,6 +57,7 @@ Drop-in replacement adds several features for command-prompt tools:
|
||||
%setup -q -n cmd2-%{version}
|
||||
chmod -x README.txt
|
||||
sed -i "s/\r//g" README.txt
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
|
Loading…
x
Reference in New Issue
Block a user