diff options
author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-09-26 20:41:41 +0200 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-09-27 12:37:16 +0200 |
commit | f495e94028bfddc264727ffc464cd694ddd05ab8 (patch) | |
tree | 8c0bf309b08576f96c9344d9937344e1447d2237 /git/compat.py | |
parent | 29eb301700c41f0af7d57d923ad069cbdf636381 (diff) | |
download | gitpython-f495e94028bfddc264727ffc464cd694ddd05ab8.tar.gz |
src, #519: collect all is_<platform>() calls
Diffstat (limited to 'git/compat.py')
-rw-r--r-- | git/compat.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/git/compat.py b/git/compat.py index b3572474..ff382ce8 100644 --- a/git/compat.py +++ b/git/compat.py @@ -7,6 +7,7 @@ """utilities to help provide compatibility with python 3""" # flake8: noqa +import os import sys from gitdb.utils.compat import ( @@ -79,3 +80,16 @@ def with_metaclass(meta, *bases): # end metaclass return metaclass(meta.__name__ + 'Helper', None, {}) # end handle py2 + + +def is_win(): + return os.name == 'nt' + + +def is_posix(): + return os.name == 'posix' + + +def is_darwin(): + return os.name == 'darwin' + |