Updated package data, pylint fix.
This commit is contained in:
@@ -7,11 +7,11 @@ import shutil
|
|||||||
import argparse
|
import argparse
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from six.moves import configparser, input
|
import six
|
||||||
|
from six.moves import configparser
|
||||||
|
|
||||||
from . import docs, __version__
|
from . import docs, __version__
|
||||||
|
|
||||||
|
|
||||||
PACKAGE = os.path.dirname(__file__)
|
PACKAGE = os.path.dirname(__file__)
|
||||||
HOME = os.path.expanduser('~')
|
HOME = os.path.expanduser('~')
|
||||||
TEMPLATE = os.path.join(PACKAGE, 'templates')
|
TEMPLATE = os.path.join(PACKAGE, 'templates')
|
||||||
@@ -65,7 +65,8 @@ def copy_default_config(filename=CONFIG):
|
|||||||
|
|
||||||
if os.path.exists(filename):
|
if os.path.exists(filename):
|
||||||
try:
|
try:
|
||||||
ch = input('File %s already exists, overwrite? y/[n]):' % filename)
|
ch = six.moves.input(
|
||||||
|
'File %s already exists, overwrite? y/[n]):' % filename)
|
||||||
if ch not in ('Y', 'y'):
|
if ch not in ('Y', 'y'):
|
||||||
return
|
return
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -20,7 +20,7 @@ setuptools.setup(
|
|||||||
license='MIT',
|
license='MIT',
|
||||||
keywords='reddit terminal praw curses',
|
keywords='reddit terminal praw curses',
|
||||||
packages=['rtv'],
|
packages=['rtv'],
|
||||||
package_data={'rtv': ['templates/index.html']},
|
package_data={'rtv': ['templates/*', 'rtv.cfg']},
|
||||||
data_files=[("share/man/man1", ["rtv.1"])],
|
data_files=[("share/man/man1", ["rtv.1"])],
|
||||||
extras_require={
|
extras_require={
|
||||||
':python_version=="2.6" or python_version=="2.7"': ['futures']},
|
':python_version=="2.6" or python_version=="2.7"': ['futures']},
|
||||||
|
|||||||
@@ -17,10 +17,9 @@ def test_copy_default_config():
|
|||||||
"Make sure the default config file was included in the package"
|
"Make sure the default config file was included in the package"
|
||||||
|
|
||||||
with NamedTemporaryFile(suffix='.cfg') as fp:
|
with NamedTemporaryFile(suffix='.cfg') as fp:
|
||||||
with mock.patch('rtv.config.input', return_value='y'):
|
with mock.patch('rtv.config.six.moves.input', return_value='y'):
|
||||||
copy_default_config(fp.name)
|
copy_default_config(fp.name)
|
||||||
with open(DEFAULT_CONFIG) as fp_default:
|
assert fp.read()
|
||||||
assert fp.read() == fp_default.read()
|
|
||||||
permissions = os.stat(fp.name).st_mode & 0o777
|
permissions = os.stat(fp.name).st_mode & 0o777
|
||||||
assert permissions == 0o664
|
assert permissions == 0o664
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user