Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanups #4

Merged
merged 4 commits into from Aug 20, 2013
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

use with open

  • Loading branch information
Mike Blume
Mike Blume committed Aug 20, 2013
commit 1812c137fbbf2a3783b065a38c1507816496065e
@@ -978,9 +978,8 @@ def modify_syslog_config_file(syslog_id, syslog_configuration_details,
% (default_config_file_name.get(syslog_id),
datetime.now().strftime('%Y-%m-%dT%H:%M:%S')))

temp_file = tempfile.NamedTemporaryFile(delete=False)
temp_file.write(content.encode('utf-8'))
temp_file.close()
with tempfile.NamedTemporaryFile(delete=False) as temp_file:
temp_file.write(content.encode('utf-8'))
if user_type == ROOT_USER:
os.popen(("cp -p %s %s"
% (default_config_file_name.get(syslog_id),
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.