Repository: rucio/rucio

Issue:
section policy/support/rucio_support missing in rucio.cfg template and tests
Modification
------------
```
[policy]
support=https://github.com/rucio/rucio/issues/new
support_rucio=https://github.com/rucio/rucio/issues/new
```
?
Typographical Review of Documentation Files
Motivation
----------

Fix typographical errors that are present in the Rucio documentation, acquire experience with the Rucio development pipeline.

Modification
------------

Fixing said typographical issues 



Discussion:
It's in both?

https://github.com/rucio/rucio/blob/master/etc/rucio.cfg.atlas.client.template

https://github.com/rucio/rucio/blob/master/etc/rucio.cfg.template
[...] tests


Resolving patch:
diff --git a/lib/rucio/client/accountclient.py b/lib/rucio/client/accountclient.py
--- a/lib/rucio/client/accountclient.py
+++ b/lib/rucio/client/accountclient.py
@@ -59,9 +59,8 @@ def add_account(self, account, type, email):
         res = self._send_request(url, type='POST', data=data)
         if res.status_code == codes.created:
             return True
-        else:
-            exc_cls, exc_msg = self._get_exception(headers=res.headers, status_code=res.status_code, data=res.content)
-            raise exc_cls(exc_msg)
+        exc_cls, exc_msg = self._get_exception(headers=res.headers, status_code=res.status_code, data=res.content)
+        raise exc_cls(exc_msg)
 
     def delete_account(self, account):
         """
@@ -79,9 +78,8 @@ def delete_account(self, account):
 
         if res.status_code == codes.ok:
             return True
-        else:
-            exc_cls, exc_msg = self._get_exception(headers=res.headers, status_code=res.status_code, data=res.content)
-            raise exc_cls(exc_msg)
+        exc_cls, exc_msg = self._get_exception(headers=res.headers, status_code=res.status_code, data=res.content)
+        raise exc_cls(exc_msg)
 
     def get_account(self, account):
         """
@@ -98,10 +96,9 @@ def get_account(self, account):
         res = self._send_request(url)
         if res.status_code == codes.ok:
             acc = self._load_json_data(res)
-            return acc.next()
-        else:
-            exc_cls, exc_msg = self._get_exception(headers=res.headers, status_code=res.status_code, data=res.content)
-            raise exc_cls(exc_msg)
+            return next(acc)
+        exc_cls, exc_msg = self._get_exception(headers=res.headers, status_code=res.status_code, data=res.content)
+        raise exc_cls(exc_msg)
 
     def set_account_status(self, account, status):
         """ Set the status of an account.
@@ -251,10 +248,9 @@ def get_account_limits(self, account):
         url = build_url(choice(self.list_hosts), path=path)
         res = self._send_request(url, type='GET')
         if res.status_code == codes.ok:
-            return self._load_json_data(res).next()
-        else:
-            exc_cls, exc_msg = self._get_exception(headers=res.headers, status_code=res.status_code, data=res.content)
-            raise exc_cls(exc_msg)
+            return next(self._load_json_data(res))
+        exc_cls, exc_msg = self._get_exception(headers=res.headers, status_code=res.status_code, data=res.content)
+        raise exc_cls(exc_msg)
 
     def get_account_limit(self, account, rse):
         """
@@ -268,10 +264,9 @@ def get_account_limit(self, account, rse):
         url = build_url(choice(self.list_hosts), path=path)
         res = self._send_request(url, type='GET')
         if res.status_code == codes.ok:
-            return self._load_json_data(res).next()
-        else:
-            exc_cls, exc_msg = self._get_exception(headers=res.headers, status_code=res.status_code, data=res.content)
-            raise exc_cls(exc_msg)
+            return next(self._load_json_data(res))
+        exc_cls, exc_msg = self._get_exception(headers=res.headers, status_code=res.status_code, data=res.content)
+        raise exc_cls(exc_msg)
 
     def get_account_usage(self, account, rse=None):
         """
diff --git a/tools/probes/common/check_fts_proxy_lifetime.py b/tools/probes/common/check_fts_proxy_lifetime.py
--- a/tools/probes/common/check_fts_proxy_lifetime.py
+++ b/tools/probes/common/check_fts_proxy_lifetime.py
@@ -33,10 +33,10 @@
     whoami = requests.get('%s/whoami' % FTS_SERVER, verify=False, cert=PROXY).json()
     delegation = requests.get('%s/delegation/%s' % (FTS_SERVER, whoami['delegation_id']), verify=False, cert=PROXY).json()
     expiration = parser.parse(delegation['termination_time'])
-    if expiration < datetime.datetime.now() + datetime.timedelta(30):
+    if expiration < datetime.datetime.now() + datetime.timedelta(days=30):
         print FTS_SERVER, expiration.strftime("%Y-%m-%d"), 'CRITICAL'
         status = CRITICAL
-    elif expiration < datetime.datetime.now() + datetime.timedelta(100):
+    elif expiration < datetime.datetime.now() + datetime.timedelta(days=100):
         print FTS_SERVER, expiration.strftime("%Y-%m-%d"), 'WARNING'
         status = WARNING
     else:


Test patch:
diff --git a/lib/rucio/tests/test_replica.py b/lib/rucio/tests/test_replica.py
--- a/lib/rucio/tests/test_replica.py
+++ b/lib/rucio/tests/test_replica.py
@@ -489,7 +489,7 @@ def test_bad_replica_methods_for_UI(self):
 
         assert_equal(nb_tot_files, nb_tot_bad_files1 + nb_tot_suspicious_files)
 
-        tomorrow = datetime.utcnow() + timedelta(2)
+        tomorrow = datetime.utcnow() + timedelta(days=1)
         data = dumps({'state': 'B', 'younger_than': tomorrow.isoformat()})
         r2 = TestApp(rep_app.wsgifunc(*mw)).get('/bad/states', headers=headers2, params=data, expect_errors=True)
         assert_equal(r2.status, 200)