mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Linting
This commit is contained in:
parent
5b30c15cf7
commit
85fc273521
@ -15,16 +15,22 @@ except ImportError:
|
||||
HAS_IMPACKET = False
|
||||
|
||||
|
||||
class StrHandle:
|
||||
class StrHandle(object):
|
||||
'''
|
||||
Fakes a file handle, so that raw strings may be uploaded instead of having
|
||||
to write files first. Used by put_str()
|
||||
'''
|
||||
def __init__(self, content):
|
||||
'''
|
||||
Init
|
||||
'''
|
||||
self.content = content
|
||||
self.finished = False
|
||||
|
||||
def string(self, writesize=None):
|
||||
'''
|
||||
Looks like a file handle
|
||||
'''
|
||||
if not self.finished:
|
||||
self.finished = True
|
||||
return self.content
|
||||
|
Loading…
Reference in New Issue
Block a user