Skip to content

Commit

Permalink
Fixes #187
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Sep 6, 2024
1 parent 0788472 commit bb73a4c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

## [Unreleased]
### Fixed
- Issue [#187](https://github.com/reportportal/agent-Python-RobotFramework/issues/187): Distutils in the agent, by @HardNorth
### Added
- Python 12 support, by @HardNorth

## [5.5.3]
### Added
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Basic dependencies
python-dateutil~=2.8.1
reportportal-client~=5.5.6
reportportal-client~=5.5.7
robotframework
19 changes: 8 additions & 11 deletions robotframework_reportportal/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

"""This module contains model that stores Robot Framework variables."""

from distutils.util import strtobool
from os import path
from typing import Optional, Union, Dict, Tuple, Any, List
from warnings import warn

from reportportal_client import OutputType, ClientType
from reportportal_client.helpers import to_bool
from reportportal_client.logs import MAX_LOG_BATCH_PAYLOAD_SIZE
from robot.libraries.BuiltIn import BuiltIn, RobotNotRunningError

Expand Down Expand Up @@ -76,26 +76,23 @@ def __init__(self) -> None:

self._pabot_pool_id = None
self._pabot_used = None
self.attach_log = bool(strtobool(get_variable(
'RP_ATTACH_LOG', default='False')))
self.attach_report = bool(strtobool(get_variable('RP_ATTACH_REPORT', default='False')))
self.attach_xunit = bool(strtobool(get_variable('RP_ATTACH_XUNIT', default='False')))
self.attach_log = to_bool(get_variable('RP_ATTACH_LOG', default='False'))
self.attach_report = to_bool(get_variable('RP_ATTACH_REPORT', default='False'))
self.attach_xunit = to_bool(get_variable('RP_ATTACH_XUNIT', default='False'))
self.launch_attributes = get_variable('RP_LAUNCH_ATTRIBUTES', default='').split()
self.launch_id = get_variable('RP_LAUNCH_UUID')
self.launch_doc = get_variable('RP_LAUNCH_DOC')
self.log_batch_size = int(get_variable(
'RP_LOG_BATCH_SIZE', default='20'))
self.mode = get_variable('RP_MODE')
self.pool_size = int(get_variable('RP_MAX_POOL_SIZE', default='50'))
self.rerun = bool(strtobool(get_variable(
'RP_RERUN', default='False')))
self.rerun = to_bool(get_variable('RP_RERUN', default='False'))
self.rerun_of = get_variable('RP_RERUN_OF', default=None)
self.skipped_issue = bool(strtobool(get_variable(
'RP_SKIPPED_ISSUE', default='True')))
self.skipped_issue = to_bool(get_variable('RP_SKIPPED_ISSUE', default='True'))
self.test_attributes = get_variable('RP_TEST_ATTRIBUTES', default='').split()
self.log_batch_payload_size = int(get_variable('RP_LOG_BATCH_PAYLOAD_SIZE',
default=str(MAX_LOG_BATCH_PAYLOAD_SIZE)))
self.launch_uuid_print = bool(strtobool(get_variable('RP_LAUNCH_UUID_PRINT', default='False')))
self.launch_uuid_print = to_bool(get_variable('RP_LAUNCH_UUID_PRINT', default='False'))
output_type = get_variable('RP_LAUNCH_UUID_PRINT_OUTPUT')
self.launch_uuid_print_output = OutputType[output_type.upper()] if output_type else None
client_type = get_variable('RP_CLIENT_TYPE')
Expand Down Expand Up @@ -169,4 +166,4 @@ def verify_ssl(self) -> Union[bool, str]:
verify_ssl = get_variable('RP_VERIFY_SSL', default='True')
if path.exists(verify_ssl):
return verify_ssl
return bool(strtobool(verify_ssl))
return to_bool(verify_ssl)

0 comments on commit bb73a4c

Please sign in to comment.