Skip to content

Commit

Permalink
- fix flake8 complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Jan 27, 2019
1 parent ad1a272 commit 736550a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -23,8 +23,8 @@
"scripts in Zope 4.",
author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
long_description=(open('README.rst').read() + '\n' +
open('CHANGES.rst').read()),
long_description=('%s\n%s' % (open('README.rst').read(),
open('CHANGES.rst').read())),
packages=find_packages('src'),
namespace_packages=['Products'],
package_dir={'': 'src'},
Expand Down
11 changes: 6 additions & 5 deletions src/Products/PythonScripts/PythonScript.py
Expand Up @@ -176,9 +176,10 @@ def ZPythonScriptHTML_upload(self, REQUEST, file=''):

if not isinstance(file, str):
if not file:
return self.ZPythonScriptHTML_editForm(self, REQUEST,
manage_tabs_message='No file specified',
manage_tabs_type='warning')
return self.ZPythonScriptHTML_editForm(
self, REQUEST,
manage_tabs_message='No file specified',
manage_tabs_type='warning')
file = file.read()

self.write(file)
Expand All @@ -198,8 +199,8 @@ def ZScriptHTML_tryParams(self):

def __setstate__(self, state):
Script.__setstate__(self, state)
if (getattr(self, 'Python_magic', None) != Python_magic or
getattr(self, 'Script_magic', None) != Script_magic):
if getattr(self, 'Python_magic', None) != Python_magic or \
getattr(self, 'Script_magic', None) != Script_magic:
global _log_complaint
if _log_complaint:
LOG.info(_log_complaint)
Expand Down

0 comments on commit 736550a

Please sign in to comment.