Skip to content

Commit

Permalink
Fix flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
argaudreau committed Sep 17, 2021
1 parent d7813ad commit e8cfe14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
15 changes: 7 additions & 8 deletions app/api/packs/campaign.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import operator
import os
from collections import defaultdict

from aiohttp_jinja2 import template
Expand Down Expand Up @@ -79,11 +78,11 @@ async def _section_profiles(self, request):
@template('operations.html')
async def _section_operations(self, request):
def load_usage_markdown(header):
f = open('plugins/fieldmanual/sphinx-docs/Basic-Usage.md','r')
markdown = []
seen_header = False
for x in f:
if (not seen_header and "## Operations" in x):
f = open('plugins/fieldmanual/sphinx-docs/Basic-Usage.md', 'r')
markdown = []
seen_header = False
for x in f:
if (not seen_header and "## Operations" in x):
markdown = []
seen_header = True
elif (seen_header and "## " in x):
Expand All @@ -95,8 +94,8 @@ def load_usage_markdown(header):
key = key.split("*")[3]
val = val.strip("\n")
markdown.append({key: val})
f.close()
return markdown
f.close()
return markdown
access = dict(access=tuple(await self.auth_svc.get_permissions(request)))
hosts = [h.display for h in await self.data_svc.locate('agents', match=access)]
groups = sorted(list(set(([h['group'] for h in hosts]))))
Expand Down
1 change: 0 additions & 1 deletion app/api/rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from app.api.packs.advanced import AdvancedPack
from app.api.packs.campaign import CampaignPack
from app.objects.secondclass.c_link import Link
from app.service.app_svc import Error
from app.service.auth_svc import check_authorization
from app.utility.base_world import BaseWorld

Expand Down

0 comments on commit e8cfe14

Please sign in to comment.