Skip to content

Commit 2175380

Browse files
committed
Merge branch 'hg'
2 parents d616046 + 1f95ae7 commit 2175380

23 files changed

+376
-375
lines changed

.hgtags

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,3 +512,4 @@ fa6fc60a9d8ab4981317c5be18e47b28868691e5 st201
512512
fa6fc60a9d8ab4981317c5be18e47b28868691e5 11.4.84.0.1.201.0
513513
4aa2fc1df7c1cf43786bcb1d7a75fea721f9864e st202
514514
d3a4e98be3b2016eecfd2fc31437d9b386a9b0c0 st203
515+
611b9daec17e8217a55d6418976b2c407604f26d st204

src/modules/cfgfiles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# registers the id/name mappings.
4141
#
4242
# Following other platforms behaviour:
43-
# https://en.wikipedia.org/wiki/User_identifier
43+
# https://en.wikipedia.org/wiki/User_identifier
4444
#
4545
# 100-499 will be used for actions where no uid/gid provided.
4646
MIN_DYNAMIC_ID = 100

src/modules/client/publisher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2119,7 +2119,7 @@ def __refresh(self, full_refresh, immediate, mismatched=False,
21192119
def refresh(self, full_refresh=False, immediate=False, progtrack=None,
21202120
include_updates=False):
21212121
"""Refreshes the publisher's metadata, returning a tuple
2122-
containing a boolean value indicating whether any updates to the
2122+
containing a boolean value indicating whether any updates to the
21232123
publisher's metadata occurred and an error object, which is
21242124
either a CatalogOriginRefreshException containing all the failed
21252125
origins for this publisher or None.

src/modules/misc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,7 @@ def validate_ssl_cert(ssl_cert, prefix=None, uri=None):
12961296
def load_trust_anchors(trust_anchor_loc, trust_anchors, bad_trust_anchors=[]):
12971297
"""Load all trust anchors in given directory; each
12981298
certificate file may have multiple trust certificates."""
1299-
ca_list = []
1299+
ca_list = []
13001300

13011301
for fn in os.listdir(trust_anchor_loc):
13021302
pth = os.path.join(trust_anchor_loc, fn)
@@ -1313,7 +1313,7 @@ def load_trust_anchors(trust_anchor_loc, trust_anchors, bad_trust_anchors=[]):
13131313
for cert in raw.split(begin_cert)[1:]:
13141314
ca_list.append(x509.load_pem_x509_certificate(begin_cert+cert, \
13151315
default_backend()))
1316-
except (ValueError, IOError) as e:
1316+
except (ValueError, IOError) as e:
13171317
bad_trust_anchors.append((pth, str(e)))
13181318
else:
13191319
# We store certificates internally by

src/modules/portable/__init__.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#
2020
# CDDL HEADER END
2121
#
22-
# Copyright (c) 2008, 2024, Oracle and/or its affiliates.
22+
# Copyright (c) 2008, 2025, Oracle and/or its affiliates.
2323
#
2424

2525
# The portable module provide access to methods that require operating system-
@@ -86,17 +86,17 @@ def get_file_type(actions):
8686
def get_group_by_name(name, dirpath, use_file):
8787
""" Return the group ID for a group name.
8888
If use_file is true, an OS-specific file from within the file tree
89-
rooted by dirpath will be consulted, if it exists. Otherwise, the
89+
rooted by dirpath will be consulted, if it exists. Otherwise, the
9090
group ID is retrieved from the operating system.
91-
Exceptions:
91+
Exceptions:
9292
KeyError if the specified group does not exist"""
9393
raise NotImplementedError
9494

9595

9696
def get_user_by_name(name, dirpath, use_file):
9797
""" Return the user ID for a user name.
9898
If use_file is true, an OS-specific file from within the file tree
99-
rooted by dirpath will be consulted, if it exists. Otherwise, the
99+
rooted by dirpath will be consulted, if it exists. Otherwise, the
100100
user ID is retrieved from the operating system.
101101
Exceptions:
102102
KeyError if the specified group does not exist"""
@@ -106,7 +106,7 @@ def get_user_by_name(name, dirpath, use_file):
106106
def get_name_by_gid(gid, dirpath, use_file):
107107
""" Return the group name for a group ID.
108108
If use_file is true, an OS-specific file from within the file tree
109-
rooted by dirpath will be consulted, if it exists. Otherwise, the
109+
rooted by dirpath will be consulted, if it exists. Otherwise, the
110110
group name is retrieved from the operating system.
111111
Exceptions:
112112
KeyError if the specified group does not exist"""
@@ -116,7 +116,7 @@ def get_name_by_gid(gid, dirpath, use_file):
116116
def get_name_by_uid(uid, dirpath, use_file):
117117
""" Return the user name for a user ID.
118118
If use_file is true, an OS-specific file from within the file tree
119-
rooted by dirpath will be consulted, if it exists. Otherwise, the
119+
rooted by dirpath will be consulted, if it exists. Otherwise, the
120120
user name is retrieved from the operating system.
121121
Exceptions:
122122
KeyError if the specified group does not exist"""
@@ -155,7 +155,7 @@ def chown(path, owner, group):
155155
""" Change ownership of a file in an OS-specific way.
156156
The owner and group ownership information should be applied to
157157
the given file, if applicable on the current runtime OS.
158-
Exceptions:
158+
Exceptions:
159159
EnvironmentError (or subclass) if the path does not exist
160160
or ownership cannot be changed"""
161161
raise NotImplementedError
@@ -181,7 +181,7 @@ def link(src, dst):
181181
def remove(path):
182182
""" Remove the given file in an OS-specific way
183183
Exceptions:
184-
OSError (or subclass) if the source path does not exist or
184+
OSError (or subclass) if the source path does not exist or
185185
the file cannot be removed"""
186186
raise NotImplementedError
187187

@@ -199,7 +199,7 @@ def copyfile(src, dst):
199199

200200

201201
def split_path(path):
202-
""" Splits a path and gives back the components of the path.
202+
""" Splits a path and gives back the components of the path.
203203
This is intended to hide platform-specific details about splitting
204204
a path into its components. This interface is similar to
205205
os.path.split() except that the entire path is split, not just
@@ -212,7 +212,7 @@ def split_path(path):
212212

213213

214214
def get_root(path):
215-
""" Returns the 'root' of the given path.
215+
""" Returns the 'root' of the given path.
216216
This should include any and all components of a path up to the first
217217
non-platform-specific component. For example, on Windows,
218218
it should include the drive letter prefix.
@@ -226,7 +226,7 @@ def get_root(path):
226226
def assert_mode(path, mode):
227227
""" Checks that the file identified by path has the given mode to
228228
the extent possible by the host operating system. Otherwise raises
229-
an AssertionError where the mode attribute of the assertion is the
229+
an AssertionError where the mode attribute of the assertion is the
230230
mode of the file."""
231231
raise NotImplementedError
232232

src/modules/portable/os_windows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# CDDL HEADER END
2121
#
2222
#
23-
# Copyright (c) 2008, 2024, Oracle and/or its affiliates.
23+
# Copyright (c) 2008, 2025, Oracle and/or its affiliates.
2424
#
2525

2626
"""
@@ -188,7 +188,7 @@ def get_trashdir(path):
188188

189189
def move_to_trash(path):
190190
"""
191-
Move the file to a trash folder within its containing image. If the
191+
Move the file to a trash folder within its containing image. If the
192192
file is not in an image, just return without moving it. If the file
193193
cannot be removed, raise an OSError exception.
194194
"""

src/modules/portable/util.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
# CDDL HEADER END
2121
#
2222
#
23-
# Copyright (c) 2008, 2024, Oracle and/or its affiliates.
23+
# Copyright (c) 2008, 2025, Oracle and/or its affiliates.
2424
#
2525
import os
2626
import platform
2727
import re
2828

2929

3030
def get_canonical_os_type():
31-
"""
31+
"""
3232
Return a standardized, lower case version of the "type" of OS family.
3333
"""
3434
if os.name == 'posix':
@@ -45,7 +45,7 @@ def get_canonical_os_type():
4545
def get_canonical_os_name():
4646
"""
4747
Return a standardized, lower case version of the name of the OS. This is
48-
useful to avoid the ambiguity of OS marketing names.
48+
useful to avoid the ambiguity of OS marketing names.
4949
"""
5050

5151
psl = platform.system().lower()
@@ -65,7 +65,7 @@ def get_os_release():
6565
"""
6666
Return a standardized, sanitized version string, consisting of a
6767
dot-separated list of integers representing the release version of
68-
this OS.
68+
this OS.
6969
"""
7070

7171
ostype = get_canonical_os_type()

src/sysrepo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def _get_image(image_dir):
205205

206206

207207
def _clean_publisher(uri):
208-
""" Remove the HTTP_PORT from the uri otherwise the rewrite rules
208+
""" Remove the HTTP_PORT from the uri otherwise the rewrite rules
209209
(in the mako file) will incorporate it with the subsequent use of
210210
libcurl, adhering to RPF7230 section 5.4, removing it and thus break
211211
the matching on the rewrite rules leading to the default response of

src/tests/api/t_api.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#
2222

2323
#
24-
# Copyright (c) 2008, 2024, Oracle and/or its affiliates.
24+
# Copyright (c) 2008, 2025, Oracle and/or its affiliates.
2525
#
2626

2727
from . import testutils
@@ -119,35 +119,35 @@ class TestPkgApi(pkg5unittest.SingleDepotTestCase):
119119

120120
p5i_bobcat = """{
121121
"packages": [
122-
"pkg:/[email protected],5.11-0",
122+
"pkg:/[email protected],5.11-0",
123123
"baz"
124-
],
124+
],
125125
"publishers": [
126126
{
127-
"alias": "cat",
128-
"name": "bobcat",
127+
"alias": "cat",
128+
"name": "bobcat",
129129
"packages": [
130130
"pkg:/[email protected],5.11-0"
131-
],
131+
],
132132
"repositories": [
133133
{
134-
"collection_type": "core",
135-
"description": "xkcd.net/325",
134+
"collection_type": "core",
135+
"description": "xkcd.net/325",
136136
"legal_uris": [
137137
"http://xkcd.com/license.html"
138-
],
139-
"mirrors": [],
140-
"name": "source",
138+
],
139+
"mirrors": [],
140+
"name": "source",
141141
"origins": [
142142
"%REAL_ORIGIN%/"
143-
],
144-
"refresh_seconds": 43200,
145-
"registration_uri": "",
143+
],
144+
"refresh_seconds": 43200,
145+
"registration_uri": "",
146146
"related_uris": []
147147
}
148148
]
149149
}
150-
],
150+
],
151151
"version": 1
152152
}
153153
"""

src/tests/api/t_config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ class TestConfig(_TestConfigBase):
11771177
uri_default = http://example.com/
11781178
urilist_basic =
11791179
urilist_default = http://example.com/,file:/example/path
1180-
uuid_basic =
1180+
uuid_basic =
11811181
uuid_default = 16fd2706-8baf-433b-82eb-8c7fada847da
11821182
""".format(uni_escape=TH_PACKAGE,
11831183
uni_txt=TH_PACKAGE),
@@ -1267,7 +1267,7 @@ def test_base(self):
12671267
bool_basic = False
12681268
str_basic =
12691269
1270-
""", str(conf))
1270+
""", str(conf)) # noqa
12711271

12721272
conf.set_property("first_section", "str_basic", TH_PACKAGE)
12731273
self.assertEqualDiff("""\
@@ -1286,7 +1286,7 @@ def test_base(self):
12861286
bool_basic = False
12871287
str_basic =
12881288
1289-
""", str(conf))
1289+
""", str(conf)) # noqa
12901290

12911291
conf.set_property("first_section", "str_basic", TH_PACKAGE)
12921292
self.assertEqualDiff("""\

0 commit comments

Comments
 (0)