|
28 | 28 | - It cannot be used with timeouts on Python. |
29 | 29 | """ |
30 | 30 |
|
31 | | -import sys |
| 31 | +from robot.version import get_version |
| 32 | +from robot.utils import JYTHON, IRONPYTHON |
32 | 33 |
|
33 | | -if sys.platform.startswith('java'): |
34 | | - from dialogs_jy import MessageDialog, PassFailDialog, InputDialog, SelectionDialog |
35 | | -elif sys.platform == 'cli': |
36 | | - from dialogs_ipy import MessageDialog, PassFailDialog, InputDialog, SelectionDialog |
| 34 | +if JYTHON: |
| 35 | + from .dialogs_jy import MessageDialog, PassFailDialog, InputDialog, SelectionDialog |
| 36 | +elif IRONPYTHON: |
| 37 | + from .dialogs_ipy import MessageDialog, PassFailDialog, InputDialog, SelectionDialog |
37 | 38 | else: |
38 | | - from dialogs_py import MessageDialog, PassFailDialog, InputDialog, SelectionDialog |
| 39 | + from .dialogs_py import MessageDialog, PassFailDialog, InputDialog, SelectionDialog |
39 | 40 |
|
40 | | -try: |
41 | | - from robot.version import get_version |
42 | | -except ImportError: |
43 | | - __version__ = '<unknown>' |
44 | | -else: |
45 | | - __version__ = get_version() |
46 | 41 |
|
| 42 | +__version__ = get_version() |
47 | 43 | __all__ = ['execute_manual_step', 'get_value_from_user', |
48 | 44 | 'get_selection_from_user', 'pause_execution'] |
49 | 45 |
|
|
0 commit comments