Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 119 #123

Merged
merged 41 commits into from May 1, 2020
Merged

Bug 119 #123

merged 41 commits into from May 1, 2020

Conversation

josev814
Copy link
Member

@josev814 josev814 commented May 1, 2020

Adjusting how the sync timestamp gets pulled to prevent an error from being thrown if there hasn't been a previous sync time.

#119

adjusting to detect py_version rather than doing a try except clause
adding a test for the is_valid_ip_address section
testing ipaddress requirements
python version_info for 2.6 isn't a dict
using with open rather than fp where possible when reading from the file
adding finally fp.close to close a file when using fp = open
using readlines in __get_last_offset, since the file is 2 lines long and
     both lines are needed
changing __get_current_offset's offset to be position, since fp.tell is
     character position rather than line offset
using fp.writelines with a list object to write the lines rather than
     writing lines individually
adjusting to use fp.readlines for first line in order to trim the \n
putting position back to offset
putting path join on the same line since the variables aren't too long
adding unit tests for the filetracker class
if the offset line is empty then the offset should be set to 0
adding a unit test that covers the bug's issue
using platform module to determine the os being used to place denyhosts
     in th ecorrect location
using sh instead of bash
fixing directory check syntax
updating python3 location detection
updating files in the current path using pwd
adding test_add_hostname fqdn and nonfqdn
adding dump_hosts test
adding test_cleared_warned_hosts
adding test_save_warned_hosts_empty
updating lock file to use with open
adding data\lockdir for the unittest
create unit tests for lockfile to increase code coverage testing
using with open in the __save_received_hosts method
adding unit tests for get_plural
adding tests for tests_util to get more code coverage
adding setup to allow using self.report for the Report class
adding additional tests for more code coverage
adjusting the timestamp being set from throwing an error is the line is
     an empty string.  By default timestamp will return 0 if nothing is
     set in the SYNC_TIMESTAMP file
@josev814 josev814 merged commit 3faf819 into denyhosts:master May 1, 2020
@josev814 josev814 deleted the bug_119 branch May 1, 2020 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant