Skip to content

Commit

Permalink
Release 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Jun 19, 2018
1 parent 0c16c90 commit d71e772
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 29 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
1.1.0 (2018-06-19)
==================

Features
--------

- Use ``/proc`` on Linux to build process tree. This is more reliable than
``ps``, which may not be available on a bare installation. `#3
<https://github.com/sarugaku/shellingham/issues/3>`_


1.0.1 (2018-06-19)
==================

Expand Down
2 changes: 0 additions & 2 deletions news/3.feature

This file was deleted.

54 changes: 27 additions & 27 deletions src/shellingham/__init__.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import importlib
import os


__version__ = '1.0.1.dev0'


class ShellDetectionFailure(EnvironmentError):
pass


def detect_shell(pid=None, max_depth=6):
name = os.name
try:
impl = importlib.import_module('.' + name, __name__)
except ImportError:
raise RuntimeError(
'Shell detection not implemented for {0!r}'.format(name),
)
try:
get_shell = impl.get_shell
except AttributeError:
raise RuntimeError('get_shell not implemented for {0!r}'.format(name))
shell = get_shell(pid, max_depth=max_depth)
if shell:
return shell
raise ShellDetectionFailure()
import importlib
import os


__version__ = '1.1.0'


class ShellDetectionFailure(EnvironmentError):
pass


def detect_shell(pid=None, max_depth=6):
name = os.name
try:
impl = importlib.import_module('.' + name, __name__)
except ImportError:
raise RuntimeError(
'Shell detection not implemented for {0!r}'.format(name),
)
try:
get_shell = impl.get_shell
except AttributeError:
raise RuntimeError('get_shell not implemented for {0!r}'.format(name))
shell = get_shell(pid, max_depth=max_depth)
if shell:
return shell
raise ShellDetectionFailure()

0 comments on commit d71e772

Please sign in to comment.