borg/src/borg/platformflags.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
359 B
Python
Raw Normal View History

2018-11-10 22:34:43 +00:00
"""
Flags for Platform-specific APIs.
Use these Flags instead of sys.platform.startswith('<OS>') or try/except.
"""
import sys
is_win32 = sys.platform.startswith("win32")
is_cygwin = sys.platform.startswith("cygwin")
2018-11-10 22:34:43 +00:00
is_linux = sys.platform.startswith("linux")
is_freebsd = sys.platform.startswith("freebsd")
is_darwin = sys.platform.startswith("darwin")