Skip to content
Browse files

Use os.fdopen instead of close + open

  • Loading branch information...
1 parent 105c61c commit 531ff9809c6b55a5b2b2c6819da26ec443a93797 @priteau priteau committed Oct 5, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 ceiclient/tests/test_integration.py
View
6 ceiclient/tests/test_integration.py
@@ -126,15 +126,13 @@ def test_process_definitions(self):
class: something
module: else"""
fh, definition_file_path = tempfile.mkstemp()
- os.close(fh)
- with open(definition_file_path, 'w') as d:
+ with os.fdopen(fh, 'w') as d:
d.write(definition)
definition_name = "proc"
process_config = "{}"
fh, process_config_path = tempfile.mkstemp()
- os.close(fh)
- with open(process_config_path, 'w') as p:
+ with os.fdopen(fh, 'w') as p:
p.write(process_config)
cmd = "ceictl -x %s process-definition create -i %s %s" % (

0 comments on commit 531ff98

Please sign in to comment.
Something went wrong with that request. Please try again.