mirror of
https://github.com/OpenMTC/OpenMTC.git
synced 2025-02-24 10:04:55 +00:00
7 lines
89 B
Python
7 lines
89 B
Python
|
|
|
|
def get_fileobj(f):
|
|
if not hasattr(f, "read"):
|
|
return open(f)
|
|
return f
|