X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FShell.py;h=25bb0d597a84c1d42bafff2dea07144f0ed5b9bf;hb=8303eacbcae9972d42971d50fa9fde93340c16bb;hp=48602f7eafabece504d7daa4701e966cb2432116;hpb=3b44c0228c26dc43d985185afc225caa5f48c1fb;p=plcapi.git diff --git a/PLC/Shell.py b/PLC/Shell.py index 48602f7..25bb0d5 100644 --- a/PLC/Shell.py +++ b/PLC/Shell.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # # Interactive shell for testing PLCAPI # @@ -146,7 +146,8 @@ class Shell: raise Exception("Must specify session") if os.path.exists(session): - session = file(session).read() + with open(session) as feed: + session = feed.read() self.auth = {'AuthMethod': "session", 'session': session} else: